package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import one.stand.dto.PageResponse2;

import java.util.Date;
import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
public class FollowResponse {
    @ApiModelProperty(value = "企业列表", dataType = "FollowResponse.Company")
    private PageResponse2<Company> companyPage;

    @ApiModel("FollowResponse.Company")
    @Data
    @Builder
    public static class Company {
        @ApiModelProperty(value = "企业ID")
        private Integer companyId;
        @ApiModelProperty(value = "企业名称")
        private String companyName;
        @ApiModelProperty(value = "企业LOGO")
        private String companyLogo;
        @ApiModelProperty(value = "等级")
        private Integer companyLevel;
        @ApiModelProperty(value = "中科公信:1存在")
        private Integer hasZkgx;

        @ApiModelProperty("类型：1动态 2头条 3直播 4上新")
        private Integer type;
        @ApiModelProperty(hidden = true)
        private Integer itemId;
        @ApiModelProperty("时间戳")
        private Date time;

        @ApiModelProperty(value = "动态数据", dataType = "FollowResponse.Dynamic")
        private Dynamic dynamic;
        @ApiModelProperty(value = "头条数据", dataType = "FollowResponse.Article")
        private Article article;
        @ApiModelProperty(value = "直播数据", dataType = "FollowResponse.Live")
        private Live live;
        @ApiModelProperty(value = "上新商品数据", dataType = "FollowResponse.Goods")
        private List<Goods> goods;

    }

    @ApiModel("FollowResponse.Dynamic")
    @Data
    @Builder
    public static class Dynamic {
        @ApiModelProperty("动态id")
        private Integer dynamicId;
        @ApiModelProperty("类型:1文章 2动态")
        private Integer type;
        @ApiModelProperty("标题")
        private String title;
        @ApiModelProperty("图片")
        private String photos;
    }

    @ApiModel("FollowResponse.Article")
    @Data
    @Builder
    public static class Article {
        @ApiModelProperty("头条ID")
        private Integer articleId;
        @ApiModelProperty("头条标题")
        private String title;
        @ApiModelProperty("分类")
        private String type;
    }

    @ApiModel("FollowResponse.Live")
    @Data
    @Builder
    public static class Live {
        @ApiModelProperty("直播ID")
        private Integer roomId;
        @ApiModelProperty("直播图片")
        private String photo;
        @ApiModelProperty("标题")
        private String title;
    }

    @ApiModel("FollowResponse.Goods")
    @Data
    @Builder
    public static class Goods {
        @ApiModelProperty("商品ID")
        private Integer goodsId;
        @ApiModelProperty("商品主图")
        private String photo;
    }
}
